﻿using System.Web;
using System.Web.Optimization;

namespace IceTea
{
    public class BundleConfig
    {
        public static void RegisterBundles(BundleCollection bundles)
        {
            //Scripts bundles
            //jquery scripts
            bundles.Add(new ScriptBundle("~/bundles/jquery")
                .Include("~/Scripts/jquery-{version}.js")
                .Include("~/Scripts/jquery-ui-{version}.js")
                .Include("~/Scripts/jquery.cookie.js"));

            //jquery validate scripts
            bundles.Add(new ScriptBundle("~/bundles/validate")
                .Include("~/Scripts/jquery.validate.js")
                .Include("~/Scripts/jquery.validate.unobtrusive.js"));
            
            //jquery ajax scripts
            bundles.Add(new ScriptBundle("~/bundles/ajax")
                .Include("~/Scripts/jquery.unobtrusive-ajax.js"));

            //bootstrap scripts
            bundles.Add(new ScriptBundle("~/bundles/bootstrap")
                .Include("~/Content/bootstrap3/js/bootstrap.js"));
            
            //CSS bundles
            //site css
            bundles.Add(new StyleBundle("~/bundles/sitecss")
                .Include("~/Content/Site.css"));

            //bootstrap css
            bundles.Add(new StyleBundle("~/bundles/bootstrapcss")
                .Include("~/Content/bootstrap3/css/bootstrap.css", 
                         "~/Content/bootstrap3/css/bootstrap-theme.css"));

            //jquery css
            bundles.Add(new StyleBundle("~/bundles/jquerycss").Include(
                        "~/Content/themes/base/jquery.ui.core.css",
                        "~/Content/themes/base/jquery.ui.resizable.css",
                        "~/Content/themes/base/jquery.ui.selectable.css",
                        "~/Content/themes/base/jquery.ui.accordion.css",
                        "~/Content/themes/base/jquery.ui.autocomplete.css",
                        "~/Content/themes/base/jquery.ui.button.css",
                        "~/Content/themes/base/jquery.ui.dialog.css",
                        "~/Content/themes/base/jquery.ui.slider.css",
                        "~/Content/themes/base/jquery.ui.tabs.css",
                        "~/Content/themes/base/jquery.ui.datepicker.css",
                        "~/Content/themes/base/jquery.ui.progressbar.css",
                        "~/Content/themes/base/jquery.ui.theme.css",
                        "~/Content/themes/base/jquery.ui.all.css",
                        "~/Content/themes/base/jquery.ui.menu.css",
                        "~/Content/themes/base/jquery.ui.spinner.css",
                        "~/Content/themes/base/jquery.ui.tooltip.css"));

            //dynatree 
            bundles.Add(new ScriptBundle("~/bundles/dynatreescript").Include(
                        "~/Scripts/jquery.dynatree-{version}.js"));
            bundles.Add(new StyleBundle("~/bundles/dynatreecss").Include(
                        "~/Content/dynatree/skin/ui.dynatree.css"));
        }
    }
}